//
//  BaseNetwork.h
//  Matchmaker
//
//  Created by 高飞 on 15/8/27.
//  Copyright (c) 2015年 Changzhou. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>

typedef NS_ENUM(NSInteger, DGHTTPMethod) {
    DGHTTPMethodGET                          = 0,
    DGHTTPMethodPOST                         = 1,
};

@interface BaseNetwork : NSObject

@property (nonatomic , readwrite , strong) NSURLSessionConfiguration *currentConfiguration;
@property (nonatomic , strong) AFHTTPSessionManager *sesstionManager;

+ (id)sharedNetwork;

/**
 *  请求
 *
 *  @param string            方法名
 *  @param params            参数
 *  @param DGHTTPMethod      GET POST
 *  @param completionHandler 返回值
 */
-(void)initWithMethodUrl:(NSString *)string
                   params:(id)params
              requestMode:(DGHTTPMethod)httpMethod
              loadingShow:(BOOL)show
             didFinshLoad:(void (^)(id result))completionHandler;

@end
